package com.party.mobile.web.dto.mall.output;

import com.party.core.model.mall.MallShowCategoryWithGoods;
import com.party.core.model.mall.MallShowSubject;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * 商品展示输出视图
 * Created by wei.li
 *
 * @date 2017/8/24 0024
 * @time 17:08
 */
public class MallShowSubjectOutput extends MallShowSubject {

    List<MallShowCategoryWithGoods> categories;

    // 主题介绍
    private String templateIntroduction;

    public String getTemplateIntroduction() {
        return templateIntroduction;
    }

    public void setTemplateIntroduction(String templateIntroduction) {
        this.templateIntroduction = templateIntroduction;
    }

    public List<MallShowCategoryWithGoods> getCategories() {
        return categories;
    }

    public void setCategories(List<MallShowCategoryWithGoods> categories) {
        this.categories = categories;
    }

    public static MallShowSubjectOutput transform(MallShowSubject mallShowSubject) {
        MallShowSubjectOutput mallShowSubjectOutput = new MallShowSubjectOutput();
        BeanUtils.copyProperties(mallShowSubject, mallShowSubjectOutput);
        return mallShowSubjectOutput;
    }
}
